namespace java com.vote.thrift

service VotedUtils{
	bool isVoted(1:i32 userId, 2:i32 questionnaireId),
	bool setVoted(1:i32 userId, 2:i32 questionnaireId)
}

struct TComment{
	1:i32 fromUserId,
	2:i32 toUserId,
	3:i32 questionnaireId,
	4:string commentText,
	5:i64 commentTime
}

service CommentUtils{
	i32 insertComment(1:TComment comment)
	list<TComment> getCommentListByQuestionnaireId(1:i32 questionnaireId, 2:i32 offset, 3:i32 length)
	i32 getCommentListCountByQuestionnaireId(1:i32 questionnaireId)
}